/**
 * Yolema.com Inc.
 * Copyright (c) 2011-2012 All Rights Reserved.
 */
package org.grayrabbit.pay.core.dao.system;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.grayrabbit.commons.dao.mybatis.BaseDao;
import org.grayrabbit.pay.core.model.entity.system.TradeTerminal;

/**
 * 
 * 
 * @author liyd
 * @version $Id: TradeTerminalDao.java, v 0.1 Sat Jun 02 22:00:25 CST 2012 liyd Exp $
 */
public interface TradeTerminalDao extends BaseDao<TradeTerminal, Integer> {

    /**
     * 查询业务对象分页列表
     * 
     * @param params
     * @return
     */
    public List<TradeTerminal> queryPageList(Map<String, Object> params);

    /**
     * 获得所有可用的终端
     * @return
     */
    public List<TradeTerminal> findEnabledTerminals();

    /**
     * 查询业务对象记录数
     * 
     * @param params
     * @return
     */
    public int queryCount(Map<String, Object> params);

    /**
     * 根据终端的code来判重
     * @param terminalCode
     * @return
     */
    public List<TradeTerminal> getByTerminalCode(String terminalCode);

    /**
     * 根据Id得到实体对象
     * 
     * @param id
     * @return
     */
    public TradeTerminal getById(Long id);

    /**
     * 根据id批量删除
     * 
     * @param idArray
     */
    public void deleteBatchById(@Param(value = "idArray") Long[] idArray);

    /**
     * 插入
     * @param tradeTerminal
     */
    public void save(TradeTerminal tradeTerminal);

    /**
     * 修改状态
     * @param tradeTerminal
     * @return
     */
    public int changeStatus(TradeTerminal tradeTerminal);

}
